<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Useful Configuration Query Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__sar__functions__helper.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Useful Configuration Query Functions<div class="ingroups"><a class="el" href="group__group__sar.html">SAR          (SAR ADC Subsystem)</a> &raquo; <a class="el" href="group__group__sar__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>This set of functions is for useful configuration query. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7d76c8f99bd22118f526d67e2bf60f44"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__helper.html#ga7d76c8f99bd22118f526d67e2bf60f44">Cy_SAR_IsChannelSigned</a> (const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *base, uint32_t chan)</td></tr>
<tr class="memdesc:ga7d76c8f99bd22118f526d67e2bf60f44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if channel result is configured for signed format, else false.  <a href="#ga7d76c8f99bd22118f526d67e2bf60f44">More...</a><br /></td></tr>
<tr class="separator:ga7d76c8f99bd22118f526d67e2bf60f44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac69c6b6cfa30d63297086067b1e78861"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__helper.html#gac69c6b6cfa30d63297086067b1e78861">Cy_SAR_IsChannelSingleEnded</a> (const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *base, uint32_t chan)</td></tr>
<tr class="memdesc:gac69c6b6cfa30d63297086067b1e78861"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if channel is single ended, else false.  <a href="#gac69c6b6cfa30d63297086067b1e78861">More...</a><br /></td></tr>
<tr class="separator:gac69c6b6cfa30d63297086067b1e78861"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga006244ce427ed95401a74e43214c77df"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__helper.html#ga006244ce427ed95401a74e43214c77df">Cy_SAR_IsChannelDifferential</a> (const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *base, uint32_t chan)</td></tr>
<tr class="memdesc:ga006244ce427ed95401a74e43214c77df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true of channel is differential, else false.  <a href="#ga006244ce427ed95401a74e43214c77df">More...</a><br /></td></tr>
<tr class="separator:ga006244ce427ed95401a74e43214c77df"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga7d76c8f99bd22118f526d67e2bf60f44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7d76c8f99bd22118f526d67e2bf60f44">&#9670;&nbsp;</a></span>Cy_SAR_IsChannelSigned()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Cy_SAR_IsChannelSigned </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>chan</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return true if channel result is configured for signed format, else false. </p>
<p>The formats for single-ended and differential channels are independent. This function will first check whether the channel is single-ended or differential.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">chan</td><td>The channel to check, between 0 and <a class="el" href="group__group__sar__macros.html#ga92cec01d80f386f95916cc4f0ef238af">CY_SAR_INJ_CHANNEL</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>If channel number is invalid, false is returned</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<div class="fragment"><div class="line">    <span class="comment">/* Query if channel 0 is signed. */</span></div><div class="line">    <span class="keywordtype">bool</span> isSigned;</div><div class="line">    </div><div class="line">    isSigned = <a class="code" href="group__group__sar__functions__helper.html#ga7d76c8f99bd22118f526d67e2bf60f44">Cy_SAR_IsChannelSigned</a>(SAR_HW, 0UL);</div></div><!-- fragment -->
</div>
</div>
<a id="gac69c6b6cfa30d63297086067b1e78861"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac69c6b6cfa30d63297086067b1e78861">&#9670;&nbsp;</a></span>Cy_SAR_IsChannelSingleEnded()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Cy_SAR_IsChannelSingleEnded </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>chan</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return true if channel is single ended, else false. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">chan</td><td>The channel to check, between 0 and <a class="el" href="group__group__sar__macros.html#ga92cec01d80f386f95916cc4f0ef238af">CY_SAR_INJ_CHANNEL</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>If channel number is invalid, false is returned</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<div class="fragment"><div class="line">    <span class="comment">/* Query if channel 0 is single ended. */</span></div><div class="line">    <span class="keywordtype">bool</span> isSingleEnded;</div><div class="line">    </div><div class="line">    isSingleEnded = <a class="code" href="group__group__sar__functions__helper.html#gac69c6b6cfa30d63297086067b1e78861">Cy_SAR_IsChannelSingleEnded</a>(SAR_HW, 0UL);</div></div><!-- fragment -->
</div>
</div>
<a id="ga006244ce427ed95401a74e43214c77df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga006244ce427ed95401a74e43214c77df">&#9670;&nbsp;</a></span>Cy_SAR_IsChannelDifferential()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE bool Cy_SAR_IsChannelDifferential </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>chan</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return true of channel is differential, else false. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">chan</td><td>The channel to check, starting at 0.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A false is return if chan is invalid.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<div class="fragment"><div class="line">    <span class="comment">/* Query if channel 0 is differential. */</span></div><div class="line">    <span class="keywordtype">bool</span> isDifferential;</div><div class="line">    </div><div class="line">    isDifferential = <a class="code" href="group__group__sar__functions__helper.html#ga006244ce427ed95401a74e43214c77df">Cy_SAR_IsChannelDifferential</a>(SAR_HW, 0UL);</div></div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
